package com.yyg.boot.web;

import com.yyg.boot.domain.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class UserController {

    @RequestMapping(value = "/users", method = RequestMethod.GET)
    public Object getUsers() {
        List<User> list = new ArrayList<>();
        //测试字符串有null的情况
        User u1 = new User("一一哥", null);
        list.add(u1);
        //list.add(null);
        return list;
    }

}
